Skip to content

Conversation

@0xLeif
Copy link
Contributor

@0xLeif 0xLeif commented Nov 29, 2025

Bug Fix (Issue #2):

  • RenderEngine.render() now splits multiline Text content on newlines
  • Previously returned single array element causing truncation in borders

Documentation:

  • Add DocC catalogs for all 9 modules with landing pages
  • Update GitHub Actions workflow to build docs for each module
  • Merge module docs into combined documentation site

Bug Fix (Issue #2):
- RenderEngine.render() now splits multiline Text content on newlines
- Previously returned single array element causing truncation in borders

Documentation:
- Add DocC catalogs for all 9 modules with landing pages
- Update GitHub Actions workflow to build docs for each module
- Merge module docs into combined documentation site
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a multiline text rendering bug and adds comprehensive DocC documentation for all modules in the swift-cli package.

Key Changes:

  • Fixes bug in RenderEngine.render() where multiline Text content was truncated by splitting rendered text on newlines while preserving empty lines
  • Adds DocC documentation catalogs with landing pages for all 9 modules (ANSI, TerminalCore, TerminalStyle, TerminalInput, TerminalLayout, TerminalComponents, TerminalGraphics, TerminalUI, and CLI)
  • Updates GitHub Actions workflow to build documentation for each module and merge them into a unified documentation site

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Sources/TerminalUI/RenderEngine.swift Fixes multiline Text rendering by splitting on newlines instead of returning single-element array
Sources/ANSI/Documentation.docc/ANSI.md Adds DocC landing page for ANSI module covering escape sequences, cursor control, colors, and styles
Sources/TerminalCore/Documentation.docc/TerminalCore.md Adds DocC landing page for TerminalCore module covering terminal I/O operations and capabilities
Sources/TerminalStyle/Documentation.docc/TerminalStyle.md Adds DocC landing page for TerminalStyle module covering text styling and gradients
Sources/TerminalInput/Documentation.docc/TerminalInput.md Adds DocC landing page for TerminalInput module covering keyboard/mouse input and line editing
Sources/TerminalLayout/Documentation.docc/TerminalLayout.md Adds DocC landing page for TerminalLayout module covering boxes, tables, and tree views
Sources/TerminalComponents/Documentation.docc/TerminalComponents.md Adds DocC landing page for TerminalComponents module covering progress bars, spinners, and prompts
Sources/TerminalGraphics/Documentation.docc/TerminalGraphics.md Adds DocC landing page for TerminalGraphics module covering terminal image protocols
Sources/TerminalUI/Documentation.docc/TerminalUI.md Adds DocC landing page for TerminalUI module covering SwiftUI-inspired TUI framework
Sources/CLI/Documentation.docc/CLI.md Adds DocC landing page for CLI umbrella module covering complete framework architecture
.github/workflows/docs.yml Updates workflow to build and merge documentation for all 8 modules plus CLI umbrella

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

generate-documentation --target $target \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path swift-cli/$target \
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --hosting-base-path for individual modules is set to swift-cli/$target, but these docs are then merged into the main docs folder which has --hosting-base-path swift-cli. This mismatch in base paths could cause broken links when the module documentation is merged into the main documentation. The module docs should use the same base path as the CLI docs (swift-cli) or be placed in subfolders that respect the base path structure.

Suggested change
--hosting-base-path swift-cli/$target \
--hosting-base-path swift-cli \

Copilot uses AI. Check for mistakes.
- name: Build Documentation
run: |
# Generate documentation for each module
for target in ANSI TerminalCore TerminalStyle TerminalInput TerminalLayout TerminalComponents TerminalGraphics TerminalUI; do
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of targets is duplicated in lines 28 and 46. Consider defining this list once as a variable at the start of the script to avoid maintenance issues if modules are added or removed. For example:

MODULES="ANSI TerminalCore TerminalStyle TerminalInput TerminalLayout TerminalComponents TerminalGraphics TerminalUI"
for target in $MODULES; do
  ...
done

Copilot uses AI. Check for mistakes.
@0xLeif 0xLeif merged commit b2526e6 into main Nov 29, 2025
8 checks passed
@0xLeif 0xLeif deleted the leif/bug/multiline-text-rendering-and-docs branch November 29, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants